#include "graph.h"
int main()
{
    Graph *graph=new Graph(8);
    graph->addEdge(0,1);
    graph->addEdge(0,4);
    graph->addEdge(1,5);
    graph->addEdge(2,5);
    graph->addEdge(5,6);
    graph->addEdge(2,6);
    graph->addEdge(2,3);
    graph->addEdge(3,6);
    graph->addEdge(3,7);
    graph->addEdge(6,7);
    graph->printMap();
    graph->BFS(1);
    graph->printBFS();
    delete graph;

    Graph *graph2=new Graph(6);
    graph2->addEdge(0,1);
    graph2->addEdge(0,3);
    graph2->addEdge(1,4);
    graph2->addEdge(1,3);
    graph2->addEdge(2,4);
    graph2->addEdge(2,5);
    graph2->printMap();
    graph2->DFS();
    graph2->printDFS();
    delete graph2;
    
    Graph *graph3=new Graph(9);
    graph3->addEdge(0,1,1,true);
    graph3->addEdge(0,2,1,true);
    graph3->addEdge(1,2,1,true);
    graph3->addEdge(1,3,1,true);
    graph3->addEdge(4,3,1,true);
    graph3->addEdge(3,6,1,true);
    graph3->addEdge(4,5,1,true);
    graph3->addEdge(5,6,1,true);
    graph3->addEdge(7,2,1,true);
    graph3->printMap();
    graph3->DFS();
    graph3->printTopo();
    delete graph3;
    return 0;
}
